home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / TEMP / GNU / bison / ParserFunc < prev    next >
Text File  |  1995-06-28  |  944b  |  34 lines

  1. Parser Function
  2. Previous: <Interface=>Interface> * Next: <Lexical=>Lexical> * Up: <Interface=>Interface>
  3.  
  4. #Wrap on
  5. {fH3}The Parser Function {fCode}yyparse{f}{f}
  6.  
  7. You call the function {fCode}yyparse{f} to cause parsing to occur.  This
  8. function reads tokens, executes actions, and ultimately returns when it
  9. encounters end-of-input or an unrecoverable syntax error.  You can also
  10. write an action which directs {fCode}yyparse{f} to return immediately without
  11. reading further.
  12.  
  13. The value returned by {fCode}yyparse{f} is 0 if parsing was successful (return
  14. is due to end-of-input).
  15.  
  16. The value is 1 if parsing failed (return is due to a syntax error).
  17.  
  18. In an action, you can cause immediate return from {fCode}yyparse{f} by using
  19. these macros:
  20.  
  21. #Indent +4
  22. #Indent
  23. {fCode}YYACCEPT{f}
  24. #Indent +4
  25. Return immediately with value 0 (to report success).
  26.  
  27. #Indent
  28. {fCode}YYABORT{f}
  29. #Indent +4
  30. Return immediately with value 1 (to report failure).
  31.  
  32. #Indent
  33.  
  34.